package com.xjtu.platform.security.loginByMail.dao;

import com.xjtu.platform.security.loginByMail.LoginByMailDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginByMailDao {
    @Select("select count(user_id) from user where email=#{email} and user_pwd=#{user_pwd}")
    int checkLogin(LoginByMailDto loginByMailDto);

    @Select("select role_web from role_model,user where user.email=#{email} and role_model.role_id=user.role_id; ")
    String getWeb(LoginByMailDto loginByMailDto);

    @Select("select user_id from user where email=#{email}")
    String getUser_id(LoginByMailDto loginByMailDto);
}
